<?php
function renderPage($title, $content, $currentPage = '') {
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo htmlspecialchars($title); ?> - CNSSL</title>
    <link rel="icon" href="/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="/static/css/styles.css">
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar">
        <div class="container">
            <div class="nav-brand">
                <a href="/" class="logo">
                    <img src="/logo.svg" width="200" height="40" alt="CNSSL">
                </a>
            </div>
            <div class="nav-menu">
                <a href="/" class="<?php echo $currentPage === 'home' ? 'active' : ''; ?>">首页</a>
                <a href="/products" class="<?php echo $currentPage === 'products' ? 'active' : ''; ?>">SSL证书</a>
                <a href="/automation" class="<?php echo $currentPage === 'automation' ? 'active' : ''; ?>">自动化</a>
                <a href="/contact" class="<?php echo $currentPage === 'contact' ? 'active' : ''; ?>">联系我们</a>
                <a href="/help" class="<?php echo $currentPage === 'help' ? 'active' : ''; ?>">帮助中心</a>
                <a href="/user/" target="_blank">会员中心</a>
            </div>
            <div class="nav-mobile">
                <button class="mobile-menu-btn" onclick="toggleMobileMenu()">
                    <span></span>
                    <span></span>
                    <span></span>
                </button>
            </div>
        </div>
    </nav>

    <!-- 主要内容 -->
    <main class="main-content">
        <?php echo $content; ?>
    </main>

    <!-- 页脚 -->
    <footer class="footer">
        <div class="container">
            <div class="footer-content">
                <div class="footer-section">
                    <h4>产品与服务</h4>
                    <ul>
                        <li><a href="/products">SSL证书</a></li>
                        <li><a href="/automation">ACME自动化</a></li>
                        <li><a href="/help" target="_blank">技术支持</a></li>
                    </ul>
                </div>
                <div class="footer-section">
                    <h4>公司信息</h4>
                    <ul>
                        <li><a href="/contact">联系我们</a></li>
                        <li><a href="#">服务条款</a></li>
                        <li><a href="#">隐私政策</a></li>
                    </ul>
                </div>
                <div class="footer-section">
                    <h4>合作伙伴</h4>
                    <div class="partner-logos">
                        <svg width="60" height="30" viewBox="0 0 60 30" xmlns="http://www.w3.org/2000/svg">
                            <rect width="60" height="30" rx="4" fill="#0066cc"/>
                            <text x="30" y="18" text-anchor="middle" fill="white" font-size="10">Certum</text>
                        </svg>
                        <svg width="60" height="30" viewBox="0 0 60 30" xmlns="http://www.w3.org/2000/svg">
                            <rect width="60" height="30" rx="4" fill="#ff6b35"/>
                            <text x="30" y="18" text-anchor="middle" fill="white" font-size="10">GoGetSSL</text>
                        </svg>
                        <svg width="60" height="30" viewBox="0 0 60 30" xmlns="http://www.w3.org/2000/svg">
                            <rect width="60" height="30" rx="4" fill="#ff6b35"/>
                            <text x="30" y="18" text-anchor="middle" fill="white" font-size="10">SslTrus</text>
                        </svg>
                        <svg width="60" height="30" viewBox="0 0 60 30" xmlns="http://www.w3.org/2000/svg">
                            <rect width="60" height="30" rx="4" fill="#22c55e"/>
                            <text x="30" y="18" text-anchor="middle" fill="white" font-size="10">Digicert</text>
                        </svg>
                    </div>
                </div>
            </div>
            <div class="footer-bottom">
                <p>&copy; 2016 CNSSL. 保留所有权利. <a href="https://beian.miit.gov.cn" target="_blank">豫ICP备123456789号</a></p>
            </div>
        </div>
    </footer>

    <script src="/static/js/main.js"></script>
</body>
</html>
<?php
}
?>